<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0">
    <meta name="description" content="图片
一级标题
二级标题
😜
代码
print(&quot;hello world!&quot;)
多行代码
print(&quot;hello world!&quot;)
print(&quot;hello world!&quot;)
..." />
    <meta name="keywords" content="" />
    <link rel="stylesheet" href="https://jiekeaoteman.github.io/media/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://jiekeaoteman.github.io/styles/main.css">
    
    <link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/styles/default.min.css">
    
    <script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/highlight.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/850552586/ericamcdn@0.1/js/clipboard.min.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/850552586/ericamcdn@0.1/css/live2d.css">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"></script>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.13.1/css/all.min.css" rel="stylesheet">
    <!-- 数学公式 -->
    
    <title>Jiekeaoteman's Blog</title>
    
    <style>
        .markdownIt-TOC {
            margin-left: 28%;
            padding-left: 2px;
            width: 80%;
        }

        .markdownIt-TOC li {
            padding-left: 8%;
        }
    </style>
    
</head>

<body>
    <div id="landlord">
        <div class="message" style="opacity:0"></div>
        <canvas id="live2d" width="240" height="250" class="live2d"></canvas>
    </div>
    <div id="codeCopyText" style="display: none">代码复制成功了哦</div>
    <div id="domainname" style="display:none">https://jiekeaoteman.github.io</div>
    <!-- 响应式布局，针对PC端内容显示 -->
    <div id="content">
        <div>
            <div id="bar">
                <head>
  <!-- 引入Bootstrap核心样式文件 -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/850552586/ericamcdn@0.1/css/bootstrap.min.css">
</head>
<style>
  @media screen and (max-width:1200px) and (min-width: 768px) {
    @media (min-width: 768px) {
      .navbar-nav {
        float: right;
        margin: 0;
      }
    }
  }
  @media screen and (max-width:768px){
    .mbapspan{
      padding: 0;
    }
  }
</style>

<body>
  <nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
      <!-- Brand and toggle get grouped for better mobile display -->
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#barmenu"
          aria-expanded="false" id="barbutton">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="https://jiekeaoteman.github.io">Jiekeaoteman&#39;s Blog&nbsp;&nbsp;|</a>
        <span class="navbar-brand mbapspan"><i id="mbaplayer" class="fa fa-play-circle-o" aria-hidden="true"
            style="font-size: 28px;top: 12px;position: absolute;" onclick="aplayerPlay();"></i></span>
      </div>

      <!-- Collect the nav links, forms, and other content for toggling -->
      <div class="collapse navbar-collapse" id="barmenu">
        <ul class="nav navbar-nav">
          
          
          <li>
            <a href="/">
              首页
            </a>
          </li>
          
          
          
          <li>
            <a href="/archives">
              归档
            </a>
          </li>
          
          
          
          <li>
            <a href="/tags">
              标签
            </a>
          </li>
          
          
          
          <li>
            <a href="/post/about">
              关于
            </a>
          </li>
          
          
          
          
          <li><a href="https://jiekeaoteman.github.io/friends">友链</a></li>

          
        </ul>
      </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
  </nav>


  <!-- 引入jQuery核心js文件 -->
  <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"></script>
  <script>
  var btstate = false;
  var bt = $("#barbutton");
  var bm = $("#barmenu");
  bt.click(function(){
    dropdown();
  })
  function dropdown(){
    console.log(btstate);
    //下拉
    if(btstate==false){
      bt.removeClass("collapsed");
      bt.attr("aria-expanded","true");
      bm.attr("aria-expanded","true")
      bm.fadeIn(700);
      btstate = true;
    }
    else{
      bt.addClass("collapsed");
      bt.attr("aria-expanded","false");
      bm.removeClass("in");
      bm.hide();
      bm.attr("aria-expanded","false");
      btstate = false;
    }
  }
  </script> 
</body>
            </div>
            <div class="row">
                <div class="side"><body>
    
    <div id=side>
        <div class="avatar-border">
            <img src="https://jiekeaoteman.github.io/images/avatar.png?v=1605616476992" class="avatar">
        </div>
        <div class="sitename">Jiekeaoteman&#39;s Blog</div>
        <span class="describtion" data-text='["十步一代码，千里不bug"]'>&nbsp;</span>
        
        <div class="search">
            <!-- <input type="text" class="search-input" placeholder="标题搜索(●'◡'●)" /> -->
            <input type="text" class="search-input" placeholder="标题搜索 ⚆_⚆ つ♡">
            <div class="search-results"></div>
        </div>
        
    <div class="share-button">
        <span>社交按钮</span>
        
        <a href="https://github.com/jiekeaoteman" target="_blank"><i style="font-size: 20px;"><img class="icon"
                    src="https://jiekeaoteman.github.io/media/images/github.png" alt=""></i></a>
        
        
        <a onclick="showqq()"><i style="font-size: 20px;"><img class="icon" src="https://jiekeaoteman.github.io/media/images/QQ.png" alt=""></i></a>
        
        
        
        
        
    </div>
    <div id="qq" style="display:none">2543451724</div>
    
    
    <div class="mchocie describtion">
        <a href="/" class="menubutton">
            首页
        </a>
    </div>
    
    
    
    <div class="mchocie describtion">
        <a href="/archives" class="menubutton">
            归档
        </a>
    </div>
    
    
    
    <div class="mchocie describtion">
        <a href="/tags" class="menubutton">
            标签
        </a>
    </div>
    
    
    
    <div class="mchocie describtion">
        <a href="/post/about" class="menubutton">
            关于
        </a>
    </div>
    
    
    
    
    <div class="mchocie describtion">
        <a href="https://jiekeaoteman.github.io/friends" class="menubutton">友人帐</a>
    </div>
    
    <hr>
    <div id="footinfo">Powered by <a href="https://github.com/getgridea/gridea" target="_blank">Gridea</a> | Theme: <a
        href="https://github.com/850552586/gridea-theme-fog">Fog</a></div>
    
    <div class="sitetime"><div id="sitegotimeDate">载入天数...</div>
    <div id="sitegotimes">载入时分秒...</div></div>
    <div id="cussitetime" style="display:none">17/11/2020</div>
    
    
    </div>


<script src="https://jiekeaoteman.github.io/media/js/wordshow.js"></script>
    
    <script>
        //----------------------站点运行时间
        var now = new Date();

        function createtime() {
            var sitegotime = document.getElementById("cussitetime").innerHTML + " 00:00:00";
            var grt = new Date(sitegotime); //此处修改你的建站时间或者网站上线时间
            now.setTime(now.getTime() + 250);
            days = (now - grt) / 1000 / 60 / 60 / 24;
            dnum = Math.floor(days);
            hours = (now - grt) / 1000 / 60 / 60 - (24 * dnum);
            hnum = Math.floor(hours);
            if (String(hnum).length == 1) {
                hnum = "0" + hnum;
            }
            minutes = (now - grt) / 1000 / 60 - (24 * 60 * dnum) - (60 * hnum);
            mnum = Math.floor(minutes);
            if (String(mnum).length == 1) {
                mnum = "0" + mnum;
            }
            seconds = (now - grt) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum);
            snum = Math.round(seconds);
            if (String(snum).length == 1) {
                snum = "0" + snum;
            }
            document.getElementById("sitegotimeDate").innerHTML = "本站已安全运行 " + dnum + " 天 ";
            document.getElementById("sitegotimes").innerHTML = hnum + " 小时 " + mnum + " 分 " + snum + " 秒";
        }
        setInterval("createtime()", 250);
    </script>
    




    
</body>
<script>
    //-------------------------------------------------搜索
    // 获取搜索框、搜索按钮、清空搜索、结果输出对应的元素
    var searchInput = document.querySelector('.search-input');
    var searchResults = document.querySelector('.search-results');

    // 申明保存文章的标题、链接、内容的数组变量
    var searchValue = '',
        arrItems = [],
        arrLinks = [],
        arrTitles = [],
        arrResults = [],
        indexItem = [],
        itemLength = 0;
    var tmpDiv = document.createElement('div');
    tmpDiv.className = 'result-item';

    // ajax 的兼容写法
    var xhr = new XMLHttpRequest() || new ActiveXObject('Microsoft.XMLHTTP');
    xhr.onreadystatechange = function () {
        if (xhr.readyState == 4 && xhr.status == 200) {
            xml = xhr.responseXML;
            arrItems = xml.getElementsByTagName('entry');
            itemLength = arrItems.length;
            // 遍历并保存所有文章对应的标题、链接、内容到对应的数组中
            // 同时过滤掉 HTML 标签
            for (i = 0; i < itemLength; i++) {
                var link = arrItems[i].getElementsByTagName('link')[0];
                arrLinks[i] = link.getAttribute("href");
                arrTitles[i] = arrItems[i].getElementsByTagName('title')[0].
                childNodes[0].nodeValue.replace(/<.*?>/g, '');
            }
        }
    }

    // 开始获取根目录下 feed.xml 文件内的数据
    xhr.open('get', '/atom.xml', true);
    xhr.send();



    // 输入框内容变化后就开始匹配，可以不用点按钮
    // 经测试，onkeydown, onchange 等方法效果不太理想，
    // 存在输入延迟等问题，最后发现触发 input 事件最理想，
    // 并且可以处理中文输入法拼写的变化
    searchInput.oninput = function () {
        setTimeout(searchConfirm, 0);
    }
    searchInput.onfocus = function () {
        searchResults.style.display = 'block';
    }

    function searchConfirm() {
        if (searchInput.value == '') {
            searchResults.style.display = 'none';
        } else if (searchInput.value.search(/^\s+$/) >= 0) {
            // 检测输入值全是空白的情况
            searchInit();
            var itemDiv = tmpDiv.cloneNode(true);
            itemDiv.innerText = '请输入有效内容...';
            searchResults.appendChild(itemDiv);
        } else {
            // 合法输入值的情况
            searchInit();
            searchValue = searchInput.value;
            // 在标题、内容中查找
            searchMatching(arrTitles, searchValue);
        }
    }

    // 每次搜索完成后的初始化
    function searchInit() {
        arrResults = [];
        indexItem = [];
        searchResults.innerHTML = '';
        searchResults.style.display = 'block';
    }

    function searchMatching(arr1, input) {
        // 忽略输入大小写
        input = new RegExp(input, 'i');
        // 在所有文章标题、内容中匹配查询值
        for (i = 0; i < itemLength; i++) {
            if (arr1[i].search(input) !== -1) {
                var arr = arr1;
                indexItem.push(i); // 保存匹配值的索引
                var indexContent = arr[i].search(input);
                // 此时 input 为 RegExp 格式 /input/i，转换为原 input 字符串长度
                var l = input.toString().length - 3;
                var step = 10;

                // 将匹配到内容的地方进行黄色标记，并包括周围一定数量的文本
                arrResults.push(arr[i].slice(indexContent - step, indexContent));
            }
        }

        // 输出总共匹配到的数目
        var totalDiv = tmpDiv.cloneNode(true);
        totalDiv.innerHTML = '<b>总匹配：' + indexItem.length + ' 项<hr></b>';
        searchResults.appendChild(totalDiv);

        // 未匹配到内容的情况
        if (indexItem.length == 0) {
            var itemDiv = tmpDiv.cloneNode(true);
            itemDiv.innerText = '未匹配到内容...';
            searchResults.appendChild(itemDiv);
        }

        // 将所有匹配内容进行组合
        for (i = 0; i < arrResults.length; i++) {
            var itemDiv = tmpDiv.cloneNode(true);
            itemDiv.innerHTML = '<b>[' + arrTitles[indexItem[i]] +
                ']</b><p>' + arrResults[i] + "</p><hr />";
            itemDiv.setAttribute('onclick', 'changeHref(arrLinks[indexItem[' + i + ']])');
            searchResults.appendChild(itemDiv);
        }
    }

    function changeHref(href) {
        location.href = href;
    }

    function showqq() {
        var qq = document.getElementById("qq").innerHTML;
        if (qq != '')
            window.location.href = "tencent://message/?uin=" + qq + "&Site=&Menu=yes";
        else
            alert("博主暂未设置QQ联系方式");
    }
</script>
</div>
                
                <div id="tab1" class="tab">
                    <div class="bars">
                        <span></span>
                        <span></span>
                        <span></span>
                    </div>
                    <div class="close"></div>
                </div>
                <div class="col-md-1 col-lg-3"></div>
                <div id="main" class="col-xs-12 col-sm-12 col-md-10 col-lg-7">
                    <link rel="stylesheet" href="https://jiekeaoteman.github.io/media/css/font-awesome.css">

<body>
    <div class="allcontent" id="postdetail">
        <div class="postshow" style="padding-bottom: 0;">
            
            <div class="postdetailimg" style="width:100%;overflow: hidden;">
                
                <img src="" class="postimage">
                
            </div>
            <div class="postinfo-detail">
                <div class="postdate"><i class="fa fa-calendar"></i>2020-11-17</div>
            <div class="poststatus postdate"><i class="fa fa-clock-o"></i> 1 min read</div>
            <div class="posttag">
                
            </div>
        </div>
        
        <div id="articlecontent">
            <div id="texttitle" style="text-align: center">
                <h2>Test-md语法</h2>
                <!-- id 将作为查询条件 -->
                <div id="pl" style="display:none">https://jiekeaoteman.github.io/post/test-md-yu-fa/</div>
                <div id="rootaddr" style="display:none">https://jiekeaoteman.github.io</div>
                <span id="hotnum">
                    <h4><i class="fa fa-eye" aria-hidden="true" style="color: #FF8C00;"></i>&nbsp;&nbsp;热度</i>: <i
                            class="hotnum">loading...</i></h4>
                </span>
            </div>
            <div class="text ">
                <p>图片<img src="https://jiekeaoteman.github.io/post-images/1605615620690.jpeg" alt="" loading="lazy"></p>
<h1 id="一级标题">一级标题</h1>
<h2 id="二级标题">二级标题</h2>
<p>😜</p>
<p>代码<br>
<code>print(&quot;hello world!&quot;)</code></p>
<p>多行代码</p>
<pre><code class="language-注释">print(&quot;hello world!&quot;)
print(&quot;hello world!&quot;)
print(&quot;hello world!&quot;)
</code></pre>
<p>无序列表</p>
<ul>
<li>aaa</li>
<li>bbb</li>
</ul>
<ul>
<li>aaa</li>
<li>bbb</li>
</ul>
<ul>
<li>aaa</li>
<li>bbb<br>
有序列表</li>
</ul>
<ol>
<li>aaa</li>
<li>bbb</li>
</ol>
<p>引用</p>
<blockquote>
<p>lalaalalal</p>
</blockquote>
<p>连接<br>
<a href="https://www.baidu.com/">baidu</a></p>
<h2 id="分割线">分割线</h2>
<hr>
<hr>
<p>表格</p>
<table>
<thead>
<tr>
<th style="text-align:left">123</th>
<th style="text-align:center">234</th>
<th style="text-align:right">345</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">abc</td>
<td style="text-align:center">bcd</td>
<td style="text-align:right">cde</td>
</tr>
<tr>
<td style="text-align:left">abc</td>
<td style="text-align:center">bcd</td>
<td style="text-align:right">cde</td>
</tr>
<tr>
<td style="text-align:left">abc</td>
<td style="text-align:center">bcd</td>
<td style="text-align:right">cde</td>
</tr>
</tbody>
</table>
<p>字体<br>
<em>md</em><br>
<em>md</em><br>
<strong>md</strong><br>
<strong>md</strong><br>
<s>md</s></p>

            </div>
            <hr style="width: 80%;">
            
            <div class="sharebtnContainer">
                <button type="button" class="sharebtn">转载分享</button>
            </div>
            <div class="shareContainer">
                <div class="share" style="height:30px;background: white;">
                    <a class="qq" href=""><i><img class="shareicon"
                                src="https://jiekeaoteman.github.io/media/images/QQ.png" alt=""></i></a>
                    <a class="wechat" href=""><i><img class="shareicon"
                                src="https://jiekeaoteman.github.io/media/images/wechat.png" alt=""></i></a>
                    <a class="weibo" href=""><i><img class="shareicon"
                                src="https://jiekeaoteman.github.io/media/images/weibo.png" alt=""></i></a>
                    <a class="qzone" href=""><i><img class="shareicon"
                                src="https://jiekeaoteman.github.io/media/images/qzone.png" alt=""></i></a>
                    <a class="douban" href=""><i><img class="shareicon"
                                src="https://jiekeaoteman.github.io/media/images/douban.png" alt=""></i></a>
                    <a class="facebook" href=""><i><img class="shareicon"
                                src="https://jiekeaoteman.github.io/media/images/facebook.png" alt=""></i></a>
                    <a class="twitter" href=""><i><img class="shareicon"
                                src="https://jiekeaoteman.github.io/media/images/twitter.png" alt=""></i></a>
                </div>
            </div>
            
            
            <div class="donateContainer">
                <img src="https://jiekeaoteman.github.io/media/images/donate.png" alt="" class="donateImg">
            </div>
            <div class="donateContainer">
                <img src="" alt="" class="donate">
            </div>
            
            <div class="postfooter">
                <ul class="post-copyright">
                    <li><strong>文章作者：</strong></li>
            <li><strong>原文链接：</strong>https://jiekeaoteman.github.io/post/test-md-yu-fa/</li>
            <li><strong>版权声明：</strong>本博客所有文章除特别声明外，均采用<i class="fa fa-fw fa-creative-commons"></i>BY-NC-SA
                许可协议。转载请注明出处！</li>
            </ul>
        </div>
        <div id="otherpost">
            
            
            <div class="next-post-pc">
                <div id="npcontainer" onclick="window.location.href= 'https://jiekeaoteman.github.io/post/hello-gridea/';return false">
                    
                    <img src="https://jiekeaoteman.github.io/post-images/hello-gridea.png" style="width: 100%;" class="opimg">
                    
                    <h4 class="optitle">Hello Gridea</h4>
                </div>
            </div>
            <div class="next-post">
                下一篇 <a href="https://jiekeaoteman.github.io/post/hello-gridea/">Hello Gridea</a>
            </div>
            
        </div>
    </div>
    </div>
    </div>

</body>
<script>
    //文章阅读热度
    var pl = $("#pl").html();
    var rootaddr = $("#rootaddr").html();
    pl = pl.replace(rootaddr, "");
    $("#hotnum").attr('id', pl);
</script>
                <div id="comment"  class="comment" style="background: white">
                    <div class="commentcontainer">
                        
                        <style>


    @media screen and (min-width: 1300px) {
        .veditor::placeholder {
            color: #b3b3b3;
            font-size: 18px;
            text-align: center;
            line-height: 3rem;
            font-family: kaiti;
        }
    }
</style>

<body>
    <div id="vcomments">
    </div>
    <script src="https://jiekeaoteman.github.io/media/js/valine.min.js"></script>
    <!-- <script src="https://unpkg.com/valine/dist/Valine.min.js"></script> -->
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"></script>
    <script src="https://sdk.jinrishici.com/v2/browser/jinrishici.js" charset="utf-8"></script>
    <script>
        new Valine({
            el: '#vcomments',
            appId: 'db4fbf69271f88d9e0e0',
            appKey: '4bce02ea1fff9af907ddcf7c3fc98243e0395e03',
            notify: true,
            verify: false,
            avatar: 'retro',
            pageSize: 10,
            placeholder: '既然来了，何不畅所欲言呢？',
            visitor: true, // 阅读量统计
        });
    </script>
    <script type="text/javascript">
        // jinrishici.load(function (result) {
        //     var jrsc_plac = result.data.content + "\n「" + result.data.origin.title + "」" + result.data.origin
        //         .dynasty + " · " + result.data.origin.author;
        //     if (jrsc_plac != undefined)
        //         document.getElementById("veditor").setAttribute("placeholder", jrsc_plac);
        // 
        var jrsc = '既然来了，何不畅所欲言呢？';
        jinrishici.load(function (result) {
                // 自己的处理逻辑
                jrsc = result.data.content + "\n「" + result.data.origin.title + "」" + result.data.origin
                 .dynasty + " · " + result.data.origin.author;
            });
    </script> 
    
</body>
                        <div class="clear"></div>
                        
                    </div>
                </div>
                </div>
                <div class="col-md-1 col-lg-2"></div>
                <div id="bg">
                </div>
            </div>
            
        
        <div class="toc-container">
            <ul class="markdownIt-TOC">
<li><a href="#%E4%B8%80%E7%BA%A7%E6%A0%87%E9%A2%98">一级标题</a>
<ul>
<li><a href="#%E4%BA%8C%E7%BA%A7%E6%A0%87%E9%A2%98">二级标题</a></li>
<li><a href="#%E5%88%86%E5%89%B2%E7%BA%BF">分割线</a></li>
</ul>
</li>
</ul>

    </div>
    </div>
    </div>
    <div class="tog">
        <div class="toggleContainer">
            <div class="toggle">
                <i class="fas fa-angle-double-up"></i>
            </div>
        </div>
    </div>
    <div id="bgchoice" style="display: none">link</div>
    
    <div id="bgurl" style="display:none"></div>
    
    </div>
</body>
<script>
    var img = $("img");
    for (var i = 0; i < img.length; i++) {
        if (img.eq(i).attr("class") == undefined) {
            img.eq(i).attr("class", "lazyload");
            var imgsrc = img.eq(i).attr("src");
            img.eq(i).attr("data-original", imgsrc);
            img.eq(i).attr("src", "");
            img.eq(i).hide();
        }
    }
</script>
<script>
    hljs.initHighlightingOnLoad();
</script>
<script>
    //寻找所有code标签，加复制按钮鸭！(行内代码除外)
    var codes = document.getElementsByTagName('code');
    if (codes.length) {
        for (var i = 0; i < codes.length; i++) {
            //高度/行高=文本行数
            // var rowNum=Math.round(codes[i].height()/parseFloat(codes[i].css('line-height')));
            // console.log("当前有"+rowNum+"行");
            var code_id = "code_id_" + i;
            codes[i].setAttribute("id", code_id);
            var ci = "#" + code_id;
            var codedot = $(ci);
            var rowNum = Math.round(codedot.height() / parseFloat(codedot.css('line-height')));
            if (rowNum <= 1) continue;
            var btn = document.createElement("button");
            btn.setAttribute("class", "copybt");
            btn.setAttribute("data-clipboard-target", "#" + code_id);
            btn.innerHTML = '复制代码';
            codes[i].parentNode.insertBefore(btn, codes[i]);
        }
    };
    var cop = new ClipboardJS('.copybt');
    var codeCopyText = $("#codeCopyText").html();
    cop.on('success', function (e) {
        alert(codeCopyText);
        e.clearSelection();
    });
    cop.on('error', function (e) {
        alert("矮油，复制失败了...手动复制吧勇士！");
        e.clearSelection();
    });
</script>

<script type="text/javascript">
    var message_Path = '/live2d/'
    var home_Path = document.getElementById("domainname").innerHTML + "/"; //此处修改为你的域名，必须带斜杠
</script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/850552586/ericamcdn@0.1/js/live2d.js"></script>
<script type="text/javascript" src="https://jiekeaoteman.github.io/media/live2d/js/message.js"></script>
<script type="text/javascript">
    loadlive2d("live2d", "https://jiekeaoteman.github.io/media/live2d/assets/tororo.model.json");
</script>

<script>
    $(function () {
        $('.toggleContainer').click(function () {
            $('html,body').animate({
                scrollTop: '0px'
            }, 800);
        });
        $(window).scroll(function () {
            var st = $(window).scrollTop();
            if (st > 30) {
                $(".toggleContainer").fadeIn(400);
            } else {
                $(".toggleContainer").fadeOut(100);
            }
        });
    });
</script>

<script>
    var bgchoice = $('#bgchoice').html();
    var bg = $('#bg');
    var bgurl = document.getElementById("bgurl").innerHTML;
    if (bgchoice == 'default')
        for (var i = 0; i < 3; i++)
            bgurl = bgurl.replace("\\", "/");
    bg.css("background", "url('" + bgurl + "')");
</script>


<script src="https://jiekeaoteman.github.io/media/js/index.js"></script>



<!-- 动态更改上(下)一篇博客图片框长宽 -->
<script>
    npcontainer = document.querySelector('#npcontainer');
    npstyle = window.getComputedStyle(npcontainer, null);
    npwidth = npstyle.width;
    npheight = 0.6 * Number(npwidth.replace("px", ""));
    npheight = npheight.toString() + "px";
    var op = $(".opimg");
    op.css("height", npheight);
</script>

<script src="https://jiekeaoteman.github.io/media/share/dist/Share.js"></script>

<script>
    var avatarSrc = $(".avatar").attr("src");
    var dp = document.getElementsByClassName("describtion")[0].innerHTML;
</script>


<script>
    var title = document.getElementById("texttitle").getElementsByTagName("h2");
    
    var share = new Share('.share', {
        title: title[0].innerHTML,
        initialized: true,
        //默认获取网站描述
        description: dp,
        //网站图片默认获取的是设置的用户头像
        image: avatarSrc,
        //激活的分享网站
        sites: ["weibo", "qq", "wechat", "douban", "qzone", "facebook", "twitter", "google"],
        //微信分享PC端会生成二维码分享,移动端如果可以唤起微信最好
        wechatQrcodeTitle: "微信扫一扫：分享", // 微信二维码提示文字
        wechatQrcodeHelper: '<p>微信里扫一下二维码</p><p>便可将本文分享至朋友圈。</p>',
        //关闭的网站分享
        disabled: ['google', 'linkedin'],
        wechatQrcodePosition: 'bottom'
    });

    //点击分享按钮展现出分享icons
    var sharebtnTag = false;
    $(".sharebtn").click(function () {
        if(!sharebtnTag)
        {
            $(".share").show();
            sharebtnTag = true;
        }
        else
        {
            $(".share").hide();
            sharebtnTag = false;
        }
    })

    var donatebtnTag = false;
    $(".donateImg").click(function () {
        if(!donatebtnTag)
        {
            $(".donate").show();
            donatebtnTag = true;
        }
        else{
            $(".donate").hide();
            donatebtnTag = false;
        }
    })

    //加载后的事件同步（阅读量、移动端评论等
    window.onload=function(){
        getHotnum();
        var sharepc = $(".share").eq(0).html();
        $(".share").eq(1).html(sharepc);
        document.getElementById("veditor").setAttribute("placeholder", jrsc);
        aplayerbtnInit();
    }
</script>


<script>
    jQuery(document).ready(function ($) {
        function lazyload() {
            var oLazyload = $("img.lazyload"),
                fLazyload = function (hLazyload) {
                    var nLazyload = $(window).height() + $(document).scrollTop();
                    oLazyload.each(function () {
                        $(this).offset().top < nLazyload && ($(this).trigger("appear"), oLazyload =
                            oLazyload.not(this));
                    }), 0 == oLazyload.length && $(window).unbind("scroll", fLazyload);
                };
            oLazyload.each(function () {
                $(this).one("appear", function () {
                    $(this).attr("src", $(this).attr("data-original"));
                    $(this).fadeIn(500);
                });
            }), $(window).bind("scroll", fLazyload), fLazyload();
        }
        lazyload();
    });
</script>

<!-- <script src="https://jiekeaoteman.github.io/media/js/av-min.js"></script> -->
<!-- <script src="https://cdn.jsdelivr.net/npm/leancloud-storage@3.13.0/dist/av-min.js"></script> -->
<!-- <script src="https://cdn.jsdelivr.net/npm/leancloud-storage@4.6.1/dist/av-live-query-min.js"></script> -->

<script>
    function getHotnum() {
        //文章阅读热度（重构，利用leancloud原生api）
        var pl = $("#pl").html();
        var rootaddr = $("#rootaddr").html();
        pl = pl.replace(rootaddr, "");

        var appid = 'db4fbf69271f88d9e0e0';
        var appkey = '4bce02ea1fff9af907ddcf7c3fc98243e0395e03';
        console.log(appid, appkey)
        if(AV==undefined)
            AV.init({
                appId: appid,
                appKey: appkey
            });
        const query = new AV.Query('Counter');
        query.equalTo('url', pl);
        var time = 'Loading...';
        query.find().then(function (results) {
            console.log(results)
            if (results.length == 0) {
                console.log("0")
                var NewCounter = AV.Object.extend('Counter');
                var nc = new NewCounter();
                nc.save({
                    time: 1,
                    title: "Test-md语法",
                    url: pl,
                    xid: pl,
                }).then(function (object) {
                    $(".hotnum").eq(0).html(1);
                    $(".hotnum").eq(1).html(1);
                });
            } else {
                id = results[0].id;
                var todo = AV.Object.createWithoutData('Counter', id);
                time = results[0].attributes.time + 1;
                todo.set("time", time);
                todo.save();
                console.log(todo);
                $(".hotnum").eq(0).html(time);
                $(".hotnum").eq(1).html(time);
            }

        }, function (error) {
            console.log(error)
        });
    }
</script>